package com.cskaoyan.mall.commons.util;

/**
 * 创建日期: 2022/05/20 14:04
 *
 * @author JinLu Zhou
 */
public class NumberFormatUtil {

    public static Integer getMaxAge(String maxAge) {
        try {
            int i = Integer.parseInt(maxAge);
            return i;
        } catch (Exception e) {
            int num = 1;
            String[] split = maxAge.split("[*]");
            for (String s : split) {
                num = num * Integer.parseInt(s);
            }
            return num;
        }
    }
}
